package com.karlis.common;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.karlis.users.dao.UsersDAO;
import com.karlis.users.model.Users;

public class App {
	public static void main(String[] args) {
		ApplicationContext context = 
	    		new ClassPathXmlApplicationContext("Spring-Module.xml");
		
		UsersDAO usersDAO = (UsersDAO) context.getBean("usersDAO");
		//Users users = new Users(1, "lietotajs1", "password1", true);
		//usersDAO.insert(users);
		
		Users user1 = usersDAO.findByUsersId(10);
		System.out.println(user1);
	}
}